package cn.minimelon.api.domain.module.dto;

import cn.hutool.core.util.StrUtil;
import cn.minimelon.api.domain.common.LoginUser;
import cn.minimelon.api.domain.module.vo.DataModelVO;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class ModelTaskData {
    private String taskType;

    private LoginUser user;

    private List<DataModelVO> modelList;

    private DataModelVO dataModel;

    public String cacheKey() {
        return StrUtil.format("progress:module:model:{}:{}", taskType, user.getUsername());
    }

    public String getUserId() {
        return user.getUsername();
    }
}
